Skip to content

fix(scripts): parse skill frontmatter as the hosts do - #20

Merged
LilMGenius merged 1 commit into
mainfrom
fix/frontmatter-yaml
Sep 30, 2026
Merged

LilMGenius merged 1 commit into
mainfrom
fix/frontmatter-yaml

Conversation

@LilMGenius

@LilMGenius LilMGenius commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

A skill whose frontmatter description holds a plain : disappears from Claude Code and Codex, while validate-skills.sh reported it as valid.

Failing input: description: Write a guide: builds and tips in any SKILL.md, then bash scripts/validate-skills.sh.
Cause: scripts/validate-skills.sh claimed to check that frontmatter "is parseable YAML" but only matched one key: value line, so it never saw that js-yaml (Claude Code) and PyYAML (Codex's quick_validate.py) read that value as a nested mapping and reject the file.

Evidence

input before after
description: Question it: now planted in ssotize passes exit 1, skills/breadth/ssotize/SKILL.md:3:14: frontmatter is not valid YAML 1.1
the 28 shipped skills pass pass

scripts/check-frontmatter.test.cjs runs in CI and proves the unquoted description fails at its line while the quoted one passes.

Fix and scope

scripts/check-frontmatter.cjs parses every frontmatter strictly with the yaml package (ISC) under YAML 1.1 and 1.2, the versions the two hosts read, and reports file, line and column; validate-skills.sh calls it in place of the regex. yaml is a pinned dev dependency, and CI and the release workflow run npm ci before validating.

The version moves to 0.17.6, a patch: the old check passed files the hosts reject.

- scripts/check-frontmatter.cjs parses every SKILL.md frontmatter with eemeli/yaml (ISC) in strict mode as YAML 1.1 and 1.2, the versions PyYAML in Codex and js-yaml in Claude Code read, and validate-skills.sh calls it in place of a key: value line regex that passed a plain description holding ": ", which both hosts reject as a nested mapping
- CI and the release workflow install the pinned yaml dev dependency before validating, and CI runs the gate's test, which proves that description fails at its line and the quoted one passes
@LilMGenius
LilMGenius merged commit 006b85c into main Sep 30, 2026
1 check passed
@LilMGenius
LilMGenius deleted the fix/frontmatter-yaml branch September 30, 2026 22:40
@LilMGenius LilMGenius changed the title fix: parse skill frontmatter as the hosts do fix(scripts): parse skill frontmatter as the hosts do Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant